package com.common.help;

import java.util.Map;


import com.google.common.collect.Maps;

public class Test13 {

	
	public static void main(String[] args) {
		
		Map<String, Integer> hashMap = Maps.newHashMap();
		Map<String, Integer> treeMap = Maps.newTreeMap();
		
		Map<String,Integer> linkMap = Maps.newLinkedHashMap();
		System.out.println("开始打印 HashMap数据");
		putMap(hashMap);
		System.out.println("开始打印 TreeMap数据");
		putMap(treeMap);
		System.out.println("开始打印 LinkMap数据");
		putMap(linkMap);
	}

	private static void putMap(Map<String, Integer> map) {
		map.put("a", 31);
		map.put("b", 32);
		map.put("c", 33);
		map.put("d", 34);
		map.put("e", 35);
		
		for(Map.Entry<String, Integer> s : map.entrySet()){
			System.out.println("key-->"+s.getKey()+"value->"+s.getValue());
		}
	}
}
